from utils.viewsets import ModelViewSet
from apps.HttpTestcase.models.ext_method import Ext_MethodModel
from apps.HttpTestcase.serializers.ext_method import ExtModeSerializer
from apps.HttpTestcase.filters.ext_method import MethodFilters


class Ext_MethodViewSet(ModelViewSet):
    perms_map = {'get': '*', 'post': 'envs_create',
                 'put': 'envs_update', 'delete': 'envs_delete'}
    queryset = Ext_MethodModel.objects.filter(is_delete=False)
    serializer_class = ExtModeSerializer
    filter_class = MethodFilters